<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let ary = [1, 5, 10, 15];
    let index = ary.findIndex((value, index) => {
      return value > 9;
    });
    // 等价于：let index = ary.findIndex((value, index) => value > 9);
    console.log(index); // 2
  </script>
</body>
</html>